<#if parentId?has_content>
	<@_sysMoudle id=parentId>
		<#assign parent=object/>
	</@_sysMoudle>
</#if>
<#if !deep?has_content><#assign deep=0/><#else><#assign deep=deep?number/></#if>
<@_sysMoudleList advanced=true parentId=parentId pageIndex=pageNum count=numPerPage>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" method="post">
		<#include "../include_page/paramters.html"/>
		<div class="searchBar">
			<ul class="searchContent">
			<#if parent?has_content>
				<li>
					<label>父模块:</label>${(parent.name)!}
				</li>
			</#if>
				<li></li>
			</ul>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<#if parent?has_content>
				<li><a href="sysMoudle/list.html?parentId=${(parent.parentId)!}&deep=${deep-1}" target="navTab" rel="sysMoudle/list"><i class="icon-circle-arrow-up icon-large"></i> 返回上一级</a></li>
				<li class="line">line</li>
			</#if>
			<#if deep lte 3>
				<li><a href="sysMoudle/add.html?parentId=${parentId!}&deep=${deep}" target="navTab" rel="sysMoudle/add"><i class="icon-plus-sign-alt icon-large"></i> 添加模块</a></li>
			</#if>
			<li><a href="sysMoudle/add.html?id={sid}&deep=${deep}" target="navTab" rel="sysMoudle/edit"><i class="icon-edit icon-large"></i> 修改模块</a></li>
			<li><a href="sysMoudle/delete.do?id={sid}" title="确定要删除这条记录吗?" target="ajaxTodo"><i class="icon-trash icon-large"></i> 删除</a></li>
		</ul>
	</div>
	<table class="list" width="100%" layoutH="99">
		<thead>
			<tr>
				<th width="30">ID</th>
				<th>名称</th>
				<th>是否菜单</th>
				<th>地址</th>
				<th>父模块</th>
				<th orderField="sort" class="<#if orderField??&&'sort'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">排序</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<#list page.list as a>
				<@t.merge 'moudleIds' a.parentId!/>
			</#list>
			<@_sysMoudle ids=t.moudleIds!><#assign moudleMap=map!/></@_sysMoudle>

			<#list page.list as a>
			<tr target="sid" rel="${a.id}">
				<td>${a.id!}</td>
				<td>${a.name!}</td>
				<td>${a.menu?then('菜单','仅权限')}</td>
				<td>${a.url!}</td>
				<td>${(moudleMap[a.parentId?string].name)!}</td>
				<td>${a.sort!}</td>
				<td>
					<#if deep lte 2>
						<a href="sysMoudle/list.html?parentId=${a.id}&deep=${(deep!'0')?number+1}" target="navTab" rel="sysMoudle/list" title="子模块管理">子模块管理</a>
					</#if>
				</td>
			</tr>
			</#list>
		</tbody>
	</table>
	<#include "../include_page/page.html"/>
</div>
</@_sysMoudleList>